Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support ConfigMap and Secret by changing env from map to EnvVar #17

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

ptyin
Copy link
Member

@ptyin ptyin commented Feb 26, 2024

The older method to configure SeataServer is to use env property like following,

apiVersion: operator.seata.apache.org/v1alpha1
kind: SeataServer
# ...
spec:
  # ...
  env:
    console.user.username: seata
    console.user.password: seata

However, the env property is just a map, it does not support valueFrom like Kubernetes EnvVar. We would like to refactor the current env implementation from map type to EnvVar so to support ConfigMap and Secret. The current form is something like following,

apiVersion: operator.seata.apache.org/v1alpha1
kind: SeataServer
# ...
spec:
  # ...
  env:
  - name: console.user.username
    value: seata
  - name: console.user.password
    valueFrom:
       secretKeyRef:
         name: seatapwd
         key: console

Fix #15

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly merged commit ee6eef5 into apache:master Jun 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ConfigMap and Secret support
2 participants